package com.ham.mud.items;

import java.util.Random;

/**
 * Created by hlucas on Jun 28, 2011 at 12:34:17 PM
 */
public class Weapon extends Item {
    public static final Random rand = new Random();
    int numD;
    int numF;

    public Weapon() {
    }
    
    public void setDice(int numD, int numF) {
        this.numD = numD;
        this.numF = numF;
    }

    public int getDiceRoll() {
        int roll = 0;
        for(int i = 0; i < numD; i++) {
            roll += rand.nextInt(numF) + 1;
        }
        return roll;
    }
}
